-- GENERATED SPELL FOR [Galvanoth] --


function spell0_22281(pUnit, Event) --@Fel Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(39139,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22281', 11000, 1)
end

function spell1_22281(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22281', 5257, 1)
end

function spell2_22281(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(38750,pUnit)
pUnit:RegisterEvent('Sorts_22281', 5000, 1)
end

function Sorts_22281(pUnit, Event)
local choix_sorts_22281 = math.random(0, 2)
if choix_sorts_22281 == 0 then
pUnit:RegisterEvent('spell0_22281', 1, 1)
end
if choix_sorts_22281 == 1 then
pUnit:RegisterEvent('spell1_22281', 1, 1)
end
if choix_sorts_22281 == 2 then
pUnit:RegisterEvent('spell2_22281', 1, 1)
end
end

function mob22281_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22281', math.random(1500, 3000), 1)
end

function mob22281_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22281_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22281_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22281, 1, 'mob22281_Action')
RegisterUnitEvent(22281, 2, 'mob22281_Leave')
RegisterUnitEvent(22281, 3, 'mob22281_Kill')
RegisterUnitEvent(22281, 4, 'mob22281_Die')
